Return value directly from the try block and avoid a variable
assignment.
Avoid temprary variable assignment by returning value directly from try
block.
Merge pull request #4342 from abhinav-upadhyay/unnessary-variable-assignment

Return value directly from the try block and avoid a variable