Checking a return value properly.