Optimize variable type