Fix isAlien to properly identify built-in functions. Partially fixes #18244

Also made the function return bool for falsy arguments.