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

Checks that $u is defined before calling prop.