Add some phpdoc type hints
Check if attribute actually exists before calling usesSource on it