Added catch statements for validation