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_.
fix pep8 issues in api/v3.py
Merge pull request #16 from daniellawrence/emtpy_query_none_capitalize

Allow for emtpy type_ in resource endpoint query