Validation on event creation

Added validation to event and ensured all database queries are safe.

Also added eventExists() function to check its there once added.