Added an null-check