should check agains blank instead of null