use empty instead of isset, this way an empty string is considered null