types: fix range::is_constant
type check: streamline binary operator type checking
revamp built-in function call