Thanks for your work on this project!
I've got a rather complex spec I recently updated to 3.1.0, but need 3.0.3 for some tooling still. I have many places where in order to support a $ref that can be null in 3.1.0, I do this:

However, it is not properly converted (even with --allOf), but instead preserved:

I'd expect to see something like
stack:
type: object
nullable: true
allOf:
- $ref: ...
Is this something that can be resolved?