Add return value when return value of queryGetLastEventId() is NULL.