refactor methods to avoid else block on returning early
Merge pull request #1513 from dereuromark/2.4-return-early

2.4 return early