Using introspection

these code will help us avoid runtime error

if object in otherCards is not PlayingCard,
without these code, it will rails runtime error,

but with these code, it will just return score = 0;