Fixes #460 - Checking for null and undefined | Added Unit Test