Throw a more helpful error when calling ServiceProvider.new with a bad type (e.g. undefined)