Avoid accessing method on a null variable

If you create a Specification that inherits from BaseSpecification and not populate the `$this->spec` with anything you would get an error message without this PR. 

This PR makes sure the code does not break. Is this the desired behavior? Should we throw an exception instead?

Ping @cakper