Additional test for check if a prop provides a DOM element.

If a prop was null before, the check had failed to detect this, as typeof null is also object. Resulted in an error. Explicit null check has been added.