Check for undefined as well

Currently breaking the _rtfrom/

Introduced in 560c79e9a1ee8d01bc9cc4b862f280fa6752a610.

Change-Id: I2c9cced3bd99bd33b36314ba2ce2be86d58e368f