NXP-12841: prevent from ClassCastException