use same check everywhere
one day I will know how @:generic works in Haxe...one day...