Check if view already exists before creating, and tests