fixed whitespace vaidation for optional inputs
whitespace now is not considered blank