Fixed error with jquery (version 1.7.2) type property can't be changed.

Apparently attr also wants to change the element. Using !== to check equality now

The error occured while using jquery version 1.7.2 Haven't checked if newer or older versions of jquery won't have this problem. However the !== equality check should have the same result.