Protect against null pointer