Added back null value check

Production vs git difference, git didn’t have this line so it was
always redirecting.