Use isinstance() rather than a check using type()

##### Issue Type:

Feature Pull Request
(i think)

##### Ansible Version:

1.5

##### Environment:

N/A

##### Summary:

I'd like to see this as an isintance() check so that I can fake the datastructure being passed in with __instancecheck__ for dict-like types that we need for our own projects.  I encountered this when calling the Runner API directly with a dict-like object that was not passing this check.

##### Steps To Reproduce:

N/A

##### Expected Results:

N/A

##### Actual Results:

N/A