Check string length before performing substringWithRange