Fixed a bug in scheduler - it checks if the process is not null before sending it to CPU for execution.