Create a new method for getting a module name

Previously, if the module name is blank, the name property of the
returned object would show up as "undefined: name". So I create a new
method for getting a module name where it also check if the module name
is undefined. If it is, then it will pass back a blank string without
the colon which would then make the name property just "name".