Improved required elements check

allow empty strings