I would also recommend to do the following for checking Pokémon, Type, moves, ect. classes:
isConst?(movetype,PBTypes,:ELECTRIC)
The colon and comma are actually correct, they're two differenr arguments. The first argument is what you're checking, second is the class you're checking against...