nocompat fix for .type

Replace specs methods that are not available in nocompat like
Number.type, Hash.type and Array.type
Style fix

Correct spacing and `;` in wrong place
Merge pull request #1244 from SergioCrisostomo/spec-fix-HASH

nocompat fix for .type