Use "if" instead of "return" is easier to understand.

Signed-off-by: Emerson MX <emersonmx@gmail.com>