def is_valid_netmask(netmask):
	"""
    Check if netmask is a valid ipv4 netmask.

	Netmask is a integer
	>>> is_valid_netmask("aa")
	False

	Netmask is less than 32 	
	>>> is_valid_netmask(34)
	False
		
	>>> is_valid_netmask(24)
	True
	
	"""
	
	try:
		netmask = int(netmask)
		if 0 < netmask < 32:
			return True
		else:
			return False
	except:
		return False