Resolves nullpointerexception caused by null requirement