Fixed NPEs when no object is actually selected when adding object to relation. This however needs further discussion.