from typing import Optional
from typing import Union


def numeric_string(string: str) -> Optional[Union[int, float]]:
	"""
	Converts a string to integer or float form (or none)

	"""

	if string.isnumeric():
		return int(string)
	else:
		partial = string.split('.')
		if all(x.isnumeric() for x in partial) & (0 < len(partial) < 3):
			return float(string)
		return None