BRANCH SP-856: Changed the condition checking into try function.