Make sure that projection is an ol.proj.Projection instance

When a projection has no extent configured, the current code will fail because projection is a string. This pull request fixed that.
Ok, I see it now.  `projection` is used in the subsequent code - I didn't see that in the context of the diff :)