Allow for emtpy type_ in resource endpoint query

Currently in both APIv2 and APIv3 all calls into API.resource() force a
type_.capitalize() when it is sometimes a NoneType object.
This causes an AttributeError as 'NoneType' object has no attribute
'capitalize'.

This patch checks if _type is not None, before trying to call
capitalize. This allows the query of a resource with an emtpy type_.