Added null check for the args