more elegant solution for is* functions