remove unneeded code
use a single if/endif directive to test for var_property/2