Calling privateExtendedKey on a public node will result in the following exception: TypeError: Cannot read property 'length' of null
I think it would be nice either adding an assert into the function with a proper message or to return null.
In comparison privateKey just returns null if it is not available, perhaps that should be followed.