With this change map.setView(null) is permitted, but map.setView(undefined) is not. map.getView now always returns a defined value, which may be null is setView was called with null.