Removed instaceof check. Not needed.
Ran fix JS style on tests