Fixed so isObject don't break on window object. Fixed so isWindow don't break on null and undefined'