exports undefined checking