added null check for email property #ugly