Generate a function in Python for finding the maximum value in a list of numbers with time complexity O(n).
num_list = [3, 7, 4, 2, 8, 16, 1, 9, 10]
def max_val(num_list):
	if len(num_list) == 0:
		return None
	
	max_num = num_list[0]
	
	for num in num_list:
		if num > max_num:
			max_num = num
	
	return max_num