(Bug 5181) Calling "prop" on an undefined value

Checks that $u is defined before calling prop.
Merge pull request #564 from hotlevel4/bug5181/CallingPropOnUndefinedValue

(Bug 5181) Calling "prop" on an undefined value