I would tend to extend it, that check is small but is must have as none resource owner can work without the `code` parameter.