getResource() is now nullable