fix required param checking

using "!" returns true for an empty string, which is
a perfectly acceptable value