Made sure unboxing does not produce a null pointer exception