Simpler casting, and more checking.
Avoid warning on LII3GC.
Simpler cast, more checking.