Bugfix in query/dataProvider.php

- If an invalid study is supplied, dataProvider.php behaves better.
  Instead of always assuming that a query has a result,
  we now check if the query failed circumventing PHP Fatal errors.