SubjectFragment: Avoid a use after null check.

Found by Coverity Scan.
Add some null checks.

Found by Coverity Scan.
Logging and returning isn't much better than a NullPointerException that would at least
provide a stacktrace but, in general, people like crashes even less than
mysteriously odd behaviour.