An element of the Jacobian is not finite or NaN

I am working on my Econ Honor Thesis. I am having a problem with these four variables: wphat, lphat, wdhat, and ldhat. (this is a slimmed down version of just the equations that I am having difficulty with, on there own they have no economic significance.)
I have attached the code below. I am uncertain how to move forward following the error codes I am getting. Any help would be greatly appreciated.
Thank you!
I have attached the code below. I am uncertain how to move forward following the error codes I am getting. Any help would be greatly appreciated.
Thank you!