Updated the interfaces constructor method to check for object instead of string