Check return value