Added method to check if value contains only numbers or not