Add method to get typed variable from variable attribute.