Make sure the userdetailsView has been defined

Before you try and remove it.