Now, however, when I want to step into check with my King, it complains "is not a valid square", instead of the expected "This exposes your royal to check".
Since these messages are from your own code, this is a matter for you to figure out yourself.
Since these messages are from your own code, this is a matter for you to figure out yourself.