Prevent crash in DrawElements when given null argument