Calculator returns 0 for empty string