In Rails I can do this:
x = user.try(:name)
this method returns nil if user is nil else user.name
nil
user
user.name
I don't think so. Why not roll your own? Not exactly equivalent but does the job.
function tryMe(obj) { return obj === null || obj === undefined ? null : obj; }