Use angular.isObject instead of typeof to cover null cases in resolver