Updating condition to check existence of order status before trying to upcase