secure casts and Std.is against enums