Fix `grep` in if statement