fixing specs. validation for empty parameters

@fosdev @jlo188 fix for failing specs. Also, includes validation for empty custom parameters. Please review and merge. Thanks!