Return checking in OO design