Fixed unchecked casts

Refs #10345