Return empty TextRange instead of null to prevent NullPointerException
Fix generics with static constructor