Implemented null check