Added guard clause check for calculator