This could be done with yoda conditionals.
`if ( ( '' === $coupon_data ) || ( null === $coupon_data ) || ( strtotime( $coupon_data['expiry'] ) < time() ) )`