More checks for nil pointers