Avoid unnecessary queries on next/previous events.

When running with a highly populated Postgresql database, the query for previous event takes unacceptably long time to fail if there are no previous instances (9-10 mins for our server).

With the .exists() condition, the time consuming query is not executed and we are able to view the new events without timing out.