decodeBPOP (Right (Just (key, raw))) = case decode raw of
    Left decodeError -> return $ Left (Error $ encode decodeError)
    Right value      -> return $ Right (Just (key, value))
decodeBPOP (Right (Just (key, raw))) = case decode raw of
    Left decodeError -> return $ Left (Error $ encode decodeError)
    Right value      -> return $ Right (Just (key, value))
decodeBPOP (Right (Just (key, raw))) = case decode raw of
    Left decodeError -> return $ Left (Error $ encode decodeError)
    Right value      -> return $ Right (Just (key, value))