adding null check for query, serializer and eventBus objects before running a query