remove if else for same return
Merge branch 'hotfix/4242'

Close #4242
Merge pull request #4243 from samsonasik/fix/ifelse.remv

remove if else for same return
Merge branch 'hotfix/4243' into develop

Forward port #4243