Returning nil if there is no Node to wrap.
Using a safer method of getting a Ruby array length.
This function was necessary to prevent crashes on startup.