Catch error if geometry is undefined