Refactor style
Correct arrow position for FF
Improve different data type handling
Fix typeOf helper for null argument under IE