Checking for existance of profile object before accessing it