Checking for validity of return status