Add PHPUnit as development require and instanceOf validation

I've added PHPUnit as a development requirement since you need it to run the tests and the prefered way to install it is through composer. Also changed .travis.yml to represent this change.

Second change is a instanceOf validation to validate that a fields value is the right instance of a class.