CONTRIB-4864 prevent PHP warning when checking var