Write a function `count_vowels` to count the number of vowels in a given string.

### Notes:

- Return `nil` or `None` for non-string inputs.
- Return `0` if the parameter is omitted.

### Examples:

```python
count_vowels("abcdefg") => 2
count_vowels("aAbcdeEfg") => 4

count_vowels(12) => None
```

Source: codewars | Difficulty: EASY

Starter code: def count_vowels(s = ''):
	

Solutions:
def count_vowels(s=''):
	return sum((x.lower() in 'aeoui' for x in s)) if type(s) == str else None


import re

def count_vowels(s=''):
	if isinstance(s, str):
		return sum((1 for _ in re.finditer('[aeiou]', s, flags=re.I)))


def count_vowels(s=''):
	if type(s) != str:
		return None
	return len([c for c in s if c.lower() in 'aeiou'])


def count_vowels(s=''):
	return len([c for c in s.lower() if c in 'aeiou']) if isinstance(s, str) else None


is_vowel = set('aeiouAEIOU').__contains__

def count_vowels(s=''):
	if type(s) == str:
		return sum(map(is_vowel, s))


def count_vowels(s=''):
	vowels = ['a', 'e', 'o', 'u', 'i']
	counter = 0
	try:
		s = s.lower()
		for char in s:
			if char in vowels:
				counter += 1
		return counter
	except AttributeError:
		return None


def count_vowels(s='', count=0, vowels='aeiou'):
	if type(s) is str:
		for i in s.lower():
			if i in vowels:
				count += 1
		return count
	else:
		return None


def count_vowels(s=''):
	count = 0
	if type(s) == str:
		for i in s:
			if i in ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U']:
				count += 1
		return count
	else:
		return None


def count_vowels(s=''):
	if not isinstance(s, str):
		return None
	return sum((c in 'aeiouAEIOU' for c in s))


def count_vowels(s=''):
	if type(s) == str:
		return sum((char in 'aeiou' for char in s.lower()))