That's a C# property. You created a normal function to read it. Properties can also be declared in UnityScript but you will need to explicitly declare the containing class.
The difference is in your case you have to call the isValid function manually:
if (myScriptInstance.isValid())
Properties looks like normal variables and can be used like variables but behind the scenes it calls the get / set function
if (myScriptInstance.isValid)
The big advantage is that you can do some extra stuff when someone, somewhere assigns a value to this "variable". In your case the property is read-only since it doesn't have a set function