The threescale lib can fail and throw NPE

Detect this case and cope (also add a unit test)