Adding assert checking nullObject and undefinedObject is a function