add the type check in ::between