Finally managed to have a static method for component types return a string without crashing the compiler