Add explicit checks for crypto_box_detached()