The start of the function should look similar to this:
func addrelations(person, person2, value): if person == null || person2 == null: return if person == player || person2 == player || person == person2: return