Typescript Check If Variable Is An Objective Statement