Instead of checking whether the socket value was hidden, use the proper node declaration to check whether the socket has an implicit input. The remaining larger change to make is allowing nodes to specify what their implicit input should actually be.