Only check for `HaikuFramework` if haiku is loaded
Created by: femtobit
Currently, using the JaxFramework
model framework without haiku being installed causes an exception, because HaikuFramework.is_my_module
(which tries to import haiku) is called anyways.
This PR fixes this by only checking for haiku
-based modules if haiku is already loaded.