"if" is not a function