Fixed null checking to coding standards