The signature of ImagingPlane is here:
https://pynwb.readthedocs.io/en/stable/pynwb.ophys.html#pynwb.ophys.ImagingPlane
In the API docs the ImagingPlane indicates that excitation lambda can be equal to None but this is no the case in the schema
https://github.com/NeurodataWithoutBorders/nwb-schema/blob/ade50ef33446beb3c7df4c6f1072ae0e821b5115/core/nwb.ophys.yaml#L216-L217
The API here in pynwb does not allow it either so it seems that this only a documentation issue.