convert closure check to a proper check