Fix dependencies with null values

* Fix dependencies with null values
* Allow custom Dependency and HasOneRelationship classes

Use case: ActiveRecord libraries won't work with `property_exists` and `isset`. Yii 2, for example, have a method called `hasAttribute` which performs property existence checking.