In general, all APIs support being called from Z80 mode code by adjusting pointers to write MB into their upper byte before calling the underlying functions.
In some underlying functions these pointers are optional, and can be null. These checks for null pointers will therefore not work for code called from Z80 Mode, as those pointers would no longer be null.
Some API implementations, such as mos_api_readvarval include checks to ensure that MB will not be added to optional pointers when being called from Z80 mode.
The APIs should be checked to ensure that this happens everywhere it should be.