Added check for NULL pointer to header of Queue