FLUID-5251: Updated code to base condition not only on strictly true/false boolean values, but also anything that javascript interpretes as boolean -eg. String evaluates to true, undefined evaluates to false, etc