Do not instantiate EmptyQuerySet but check if it's None

Django 1.6 removed the possibility of instantiating EmptyQuerySet:
https://docs.djangoproject.com/en/1.6/releases/1.6/#miscellaneous