This only checks for valid style properties, it does not "register" or optimize anymore.
Return the single object if either is null. Otherwise return array of styles.