Typescript Check For Empty Object Javascript Methods And Functions