reduce .has() to single expression