There's a CoffeeScript shorthand you can take advantage of:
f?()
is equivalent to
f() if typeof f is 'function'
which means that you can write
success_message = msg?() ? msg
This works because msg?() has the value undefined if msg isn't a function.
Caveat: This will fail if msg() returns null, setting success_message to the msg function.
Really, if you're going to do this in your application, you should write a utility function:
toVal = (x) -> if typeof x is 'function' then x() else x
successMessage = toVal msg
You could even attach toVal to the Object prototype if you're feeling adventurous..