Re-did removeCharacter method to avoid null pointer