Corrected issue #514

Corrected #514 by adding a check for definedness of a condition in an if
statement