Fix to null checking.